﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utilities;
using System.Web.Security;

namespace SocialShare.Web.Controls
{
    public partial class vwAdminHeader : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void imbLogout_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Session.Clear();
            CookieManager.IsLoggedout = true;
            FormsAuthentication.SignOut();
            RedirectToAdminLogin();
        }

        private void RedirectToAdminLogin()
        {
            Response.Redirect("~/admin-login.aspx");
        }
    }
}